import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:"/home"
  },
  {
    path: '/home',
    name: 'home',
    component: HomeView,
    meta:{
      footshow:true,
    },
  },
  {
    path: '/destination',
    name: 'destination',
    meta:{
      footshow:true,
    },
    component: () => import('../views/destinationView.vue')
  },
  {
    path: '/TimeLimit',
    name: 'TimeLimit',
    meta:{
      footshow:true,
    },
    component: () => import('../views/TimeLimit.vue')
  },
  {
    path: '/my',
    name: 'my',
    meta:{
      footshow:true,
    },
    component: () => import('../views/myView.vue')
  },
  {
    path: '/place',
    name: 'place',
    component: () => import('../views/placeView.vue')
  },
  {
    path: '/details',
    name: 'details',
    component: () => import('../views/detailsView.vue')
  },
  {
    path: '/data',
    name: 'data',
    component: () => import('../views/dataView.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/loginView.vue')
  },
  {
    path: '/myorder',
    name: 'myorder',
    component: () => import('../views/myorderView.vue')
  },
  {
    path: '/collection',
    name: 'collection',
    component: () => import('../views/collectionView.vue')
  },
  {
    path: '/setup',
    name: 'setup',
    component: () => import('../views/setupView.vue')
  },
  {
    path: '/search',
    name: 'search',
    component: () => import('../views/searchView.vue')
  },
  {
    path: '/OrderDetails',
    name: 'OrderDetails',
    component: () => import('../views/OrderDetails.vue')
  },
  {
    path: '/PublishComment',
    name: 'PublishComment',
    component: () => import('../views/PublishComment.vue')
  },
  {
    path: '/HomeType',
    name: 'HomeType',
    component: () => import('../views/HomeType.vue')
  },
  {
    path: '/MyComments',
    name: 'MyComments',
    component: () => import('../views/MyComments.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
  scrollBehavior() {
    return { x: 0, y: 0 }
   }
})

export default router
